<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/css/common.css}">
    <link rel="stylesheet" th:href="@{/css/main.css}">
    <!--    <script language="JavaScript">-->
    <!--        function delTopic(topicId){-->
    <!--            if(window.confirm("是否确认删除日志？")){-->
    <!--                window.location.href="topic.do?operate=delTopic&topicId="+topicId;-->
    <!--            }-->
    <!--        }-->
    <!--    </script>-->
    <script language="JavaScript" src="js/index.js"></script>
</head>
<body>
<div id="div_topic_list">
    <div id="div_to_add">
        <p class="right8">发表新日志</p>
    </div>
    <table id="tbl_topic_list">
        <tr>
            <th>ID</th>
            <th>标题</th>
            <th>日期</th>
            <th>操作</th>
        </tr>
        <tr th:if="${#lists.isEmpty(session.topicList)}">
            <th colspan="4">暂无日志列表</th>
        </tr>
        <tr th:unless="${#lists.isEmpty(session.topicList)}" th:each="topic : ${session.topicList}">
            <td th:text="${topic.id}">2</td>
            <td class="left"><a th:href="@{|/topic.do?operate=getTopicDetail&topicId=${topic.id}|}"
                                th:text="${topic.title}">我乔峰要走，你们谁可阻拦</a></td>
            <td th:text="${topic.topicDate}">2021-09-01 12:30:55</td>
            <td th:if="${topic.uid==session.userBasicBean.id} ">
                <input type="button" value="删除" th:onclick="|del(${topic.id})|"/>
            </td>


        </tr>
    </table>
</div>
</body>
</html>
